package com.algo.rpc.common;

import com.algo.rpc.business.UserService;

import java.util.UUID;

public class SerializeTest {

    public static void main(String[] args) throws Exception {
        RpcRequest request = new RpcRequest();
        request.setRequestId(UUID.randomUUID().toString().replace("-", ""));
        request.setServiceInterfaceClass(UserService.class);
        request.setMethodName("sayHello");
        request.setParameterTypes(new Class[] {String.class});
        request.setArgs(new String[] {"njkdha"});

        byte [] bytes = HessionSerializeUtil.serialize(request);
        System.out.println(HessionSerializeUtil.deserialize(bytes));
    }

}
